#/bin/bash

find_dir=${1:-'./'}

all_sh_files=$(find $find_dir -name "openeuler-glibc*.sh")

pwd_dir=$(pwd)

for one_file in ${all_sh_files}; do
    sh_dir=${one_file%/*}
    sh_name=${one_file##*/}
    echo "----- auto install ${one_file} -----"
    cd ${sh_dir}
        sh ${sh_name} << endl
./sdk
y
endl
    cd ${pwd_dir}
done
